/**
 * Created by zhangsong on 2019/9/23.
 */
// import { formatMessage } from '@/utils/i18n';
import { StaffApplication, ContractorApplication, VaccineApplication, AlarmEmailApplication, VehicleApplication, TemporaryApplication } from './routes';

export default [
  {
    path: StaffApplication.url,
    locale: `menu.${StaffApplication.code}`,
    name: 'StaffApplication',
    authority: StaffApplication.authority,
    icon: 'user',
    children: [
      {
        path: StaffApplication.add.url,
        locale: `menu.${StaffApplication.add.code}`,
        authority: StaffApplication.add.authority,
        name: 'Add',
      },
      {
        path: StaffApplication.list.url,
        locale: `menu.${StaffApplication.list.code}`,
        authority: StaffApplication.list.authority,
        name: 'List',
        // 当匹配到如下路径时,高亮对应菜单
        //        routes: [
        //          {
        //            path: '/application/staff/list',
        //            name: 'List',
        //            exact: true,
        //          },
        //        ],
      },
    ],
  },
  {
    path: ContractorApplication.url,
    locale: `menu.${ContractorApplication.code}`,
    authority: ContractorApplication.authority,
    name: 'ContractorApplication',
    icon: 'team',
    children: [
      {
        path: ContractorApplication.add.url,
        locale: `menu.${ContractorApplication.add.code}`,
        authority: ContractorApplication.add.authority,
        name: 'Add',
      },
      {
        path: ContractorApplication.list.url,
        locale: `menu.${ContractorApplication.list.code}`,
        authority: ContractorApplication.list.authority,
        name: 'List',
      },
    ],
  },
  // 臨時通行證
  {
    path: TemporaryApplication.url,
    locale: `menu.${TemporaryApplication.code}`,
    authority: TemporaryApplication.authority,
    name: 'TemporaryApplication',
    icon: 'idcard',
    children: [
      {
        path: TemporaryApplication.add.url,
        locale: `menu.${TemporaryApplication.add.code}`,
        authority: TemporaryApplication.add.authority,
        name: 'Add',
      },
      {
        path: TemporaryApplication.list.url,
        locale: `menu.${TemporaryApplication.list.code}`,
        authority: TemporaryApplication.list.authority,
        name: 'List',
      },
    ],
  },
  {
    path: VaccineApplication.url,
    locale: `menu.${VaccineApplication.code}`,
    authority: VaccineApplication.authority,
    name: 'VaccineApplication',
    icon: 'setting',
    children: [
      {
        path: VaccineApplication.add.url,
        locale: `menu.${VaccineApplication.add.code}`,
        authority: VaccineApplication.add.authority,
        name: 'Setting',
      },
      {
        path: VaccineApplication.time.url,
        locale: `menu.${VaccineApplication.time.code}`,
        authority: VaccineApplication.time.authority,
        name: 'PartbTime',
      },
    ],
  },
  // 警报页面
  {
    path: AlarmEmailApplication.url,
    locale: `menu.${AlarmEmailApplication.add.code}`,
    authority: AlarmEmailApplication.authority,
    name: 'AlarmEmailApplication',
    icon: 'warning',
    children: [
      {
        path: AlarmEmailApplication.add.url,
        locale: `menu.${AlarmEmailApplication.add.code}`,
        authority: AlarmEmailApplication.add.authority,
        name: 'List',
      },
    ],
  },
  // {
  //   path: VehicleApplication.url,
  //   locale: `menu.${VehicleApplication.code}`,
  //   authority: VehicleApplication.authority,
  //   name: 'VehicleApplication',
  //   icon: 'car',
  //   children: [
  //     {
  //       path: VehicleApplication.add.url,
  //       locale: `menu.${VehicleApplication.add.code}`,
  //       authority: VehicleApplication.add.authority,
  //       name: 'Add',
  //     },
  //     {
  //       path: VehicleApplication.list.url,
  //       locale: `menu.${VehicleApplication.list.code}`,
  //       authority: VehicleApplication.list.authority,
  //       name: 'List',
  //     },
  //   ],
  // },
];
